Dynomotion

Group: DynoMotion Message: 328 From: fermanz Date: 4/27/2010
Subject: Connecting Keling MPG2 pendant
I am trying to connect a Keling MPG2 pendant and the wiring instructions differ between the recommendations on this forum and those that Keling supply.
The KFlop connect to the 16 pin plug JP6 (aux#1) as follows -

Pin8 - GND – COM MPG
Pin1 - 5V – 5V
Pin3 - 3.3 - COM select
Pin5 - IO26 – A
Pin6 - IO27 – B
Pin7 - IO28 – X select
Pin10 - IO29 – Y select
Pin11 - IO30 – Z select
Pin12 - IO31 – X1 select
Pin13 - IO32 – X100 select

While Keling uses a DB25 plug connected thus -

1 : +5V
2 : 0V
3 : A
4 : B
5 : + indicator lamp
6 : - indicator lamp
7 : X axis
8 : Y axis
9 : Z axis
10 : 4th axis
11 : x1
12 : x10
13 : X100
14 : COM Control Switch
15 : C Stop Switch
16 : CN Stop Switch
17 : Standby

Has anyone connected one of these units and worked out how to mix and match the wiring?

#1 Which wire is surplus between a 16 pin plug and 17 connections?

#2 Where is the X10 connected? And is there anything covering it in the C program?

#3 Where is the Stop switch connected on the KFlop?

#4 What is 14 : Com Control Switch?

#5 Should I assume that 2 :0V is meant to be GND?

Any help would be much appreciated :)

Ross
Group: DynoMotion Message: 331 From: Tom Kerekes Date: 4/27/2010
Subject: Re: Connecting Keling MPG2 pendant
Hi Ross,
 
Try this
KFLOP JP6 pins--------KFLOP Names------Keling Old Name----Keling New Name---Keling Item Number
Pin8                            GND                   COM MPG                 0V                            2
Pin1                            5V                           5V                       +5V                           1           
Pin3                            3.3V                   COM select        COM Control Switch          14
Pin5                           IO26                             A                       A                             3
Pin6                           IO27                             B                       B                             4
Pin7                           IO28                        X select                X axis                         7
Pin10                         IO29                        Y select                Y axis                        8
Pin11                         IO30                        Z select                 Z axis                        9
Pin12                         IO31                       X1 select                 X1                            11
Pin13                         IO32                     X100 select               X100                         13
 
 
Regarding your questions:
 
#1 - not sure what you mean.  There are a few unused pins.  Just make the 10 connections shown above.
 
#2 - to save a wire and an I/O bit, the software program assumes X10 if neither X1 or X100 is selected
 
#3 - usually the stop switch is connected to the main estop relay for the system and not directly to KFlop
 
#4 - I think "COM Control Switch" means that it is the common node fro all the control switches.  We connect this to 3.3V so that when the various control switches close the corresponding IO gets pulled up to 3.3V.  Those IOs have internal pull down resistors so when the control switches open the IO drop low.
 
#5 - yes 0V is GND for their manual quadrature encoder.
 
Hope this helps
TK
 
 

Group: DynoMotion Message: 334 From: fermanz Date: 4/28/2010
Subject: Re: Connecting Keling MPG2 pendant
Thanks Tom,
Your help is always very much appreciated and that clears up that hazy bit.

How does Mach3 call the Init3AnalogPlusMPG.c program?
Or is it to be copied into the init.c file?

Ross



--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ross,
>
> Try this
>
> KFLOP JP6 pins--------KFLOP Names------Keling Old Name----Keling New Name---Keling Item Number
>
Group: DynoMotion Message: 336 From: Tom Kerekes Date: 4/29/2010
Subject: Re: Connecting Keling MPG2 pendant
Hi Ross,
 
Yes the parts of Init3AnalogPlusMPG that relate to the MPG need to be merged into your init.c file.  Basically the loop at the end that services the MPG and a few definitions.
 
TK

Group: DynoMotion Message: 338 From: fermanz Date: 4/29/2010
Subject: Re: Connecting Keling MPG2 pendant
Thanks Tom,
That's sufficiently vague enough to have me wondering what to leave out :)
I can figure that I don't have to replicate what's there, in the existing Mach3 init.c file but "a few definitions"??

I will go through it again but it is, for me, like wading through mud and wondering if there is some quicksand lurking there to swallow me.

I realise that if I leave some code out that it won't work.
But if I leave too much in does it matter?

Ross

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ross,
>
> Yes the parts of Init3AnalogPlusMPG that relate to the MPG need to be merged into your init.c file.  Basically the loop at the end that services the MPG and a few definitions.
>
> TK
>
>
>
>
> ________________________________
> From: fermanz <ferman@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wed, April 28, 2010 8:27:55 PM
> Subject: [DynoMotion] Re: Connecting Keling MPG2 pendant
>
>  
> Thanks Tom,
> Your help is always very much appreciated and that clears up that hazy bit.
>
> How does Mach3 call the Init3AnalogPlusMPG. c program?
> Or is it to be copied into the init.c file?
>
> Ross
>
> --- In DynoMotion@yahoogro ups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ross,
> >
> > Try this
> >
> > KFLOP JP6 pins-------- KFLOP Names------Keling Old Name----Keling New Name---Keling Item Number
> >
>
Group: DynoMotion Message: 339 From: Tom Kerekes Date: 4/29/2010
Subject: Re: Connecting Keling MPG2 pendant
Hi Ross,
 
Sorry for being vague.  If you leave out a definition the compiler will usually complain.  So one approach is to move things in until the compiler stops complaining :}
 
The definitions are:
 

#define

QA 26 // define to which IO bits the AB signals are connected

#define

QB 27

 

 

int BitA,Change1=0,Change2=0, DiffX2;

int PosNoWrap, NewPos, Pos=0, wraps;

double Factor=0;

 

Regards
TK